package com.xiantianxia.lty.common.starter;

import javax.annotation.Resource;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import com.xiantianxia.lty.common.util.cache.UserCache;
import com.xiantianxia.lty.user.service.UserService;

/**
 * 服务启动执行
 */
@Component
public class LoadCacheRunner implements CommandLineRunner {

	@Resource
	private UserService userService;
	
	@Override
	public void run(String... args) throws Exception {
		UserCache.userList = userService.list();
	}

}